<?php

return [
    'components' => [
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@common/mail',
            // send all mails to a file by default. You have to set
            // 'useFileTransport' to false and configure a transport
            // for the mailer to send real emails.
            'useFileTransport' => true,
        ],
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=cnatm',
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8mb4',
            'tablePrefix' => 'yb_',
            'enableSchemaCache' => !YII_DEBUG,
            'schemaCacheDuration' => 3600,
        ],
        'log' => [
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['info', 'error', 'warning'],
                    'logFile' => '@app/runtime/queue/' . date('Ym/d') . '.log',
                    'logVars' => ['_GET', '_POST'],
                    'categories' => ['queue'],
                ]
            ],
        ],
        //系统加密
        'security' => [
            'public_key' => 'ZDwJ662qLL&#$N&C',
            'secret_key' => md5('youmbe'),
        ],
        //微信小程序(社区核酸检测管理小程序)
        'wechatMp' => [
            'class' => 'common\components\wechat\MpWechat',
            'appId' => 'wx90cd18b639527f17',
            'appSecret' => 'b0bf24a8d5cb17e45b5368e40e7aa532',
            //
            'token' => 'bhhV8ET3fQe1YWyVXUJWxt1VXeny11Yu',
            'encodingAesKey' => 'FHYQYuxx8dPWdltxQn801PpHeZWxzfV3HYJzVnqWxhf',
        ],
        //阿里OSS
        'alioss' => [
            'accessKeyId' => 'LTAISMCWjwk9a5DN',
            'accessKeySecret' => 'C6J9tcs5GMRBXWINvvDIj20T7LAT1C',
            'endpoint' => 'https://oss-cn-beijing.aliyuncs.com',
            'bucket' => 'youmbe',
            'host' => 'https://oss.youmbe.com',
        ],
        //阿里RAM
        'alists' => [
            'accessKeyId' => 'LTAISMCWjwk9a5DN',
            'accessKeySecret' => 'C6J9tcs5GMRBXWINvvDIj20T7LAT1C',
            'endpoint' => 'https://oss-cn-beijing.aliyuncs.com',
            'bucket' => 'youmbe',
            'host' => 'https://oss.youmbe.com',
            'roleArn' => 'acs:ram::1644823653065188:role/youmbe',
        ],
    ],
];
